<template>
  <div>
    <van-tabbar :border="false"
                v-model="active"
                :route="true"
                active-color="#f52443" >
      <van-tabbar-item
          v-for="(item,index) in navbar" :to="item.url" :key="index"   class-prefix="my-icon" :icon="item.icon">
        <span  style="font-weight: bold;">{{item.title}}</span>
        <template #icon="props">
<!--          props.active-->
          <icon-svg   :icon-class="props.active ? item.iconActive : item.iconInactive"></icon-svg>
<!--          v-if="props.active"-->
<!--          <icon-svg  v-else :icon-class="iconInactive"  style="font-size: 25px;"></icon-svg>-->
        </template>
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: "Tabbar",
  data() {
    return {
      active: 0,
      navbar:[
          {title:'首页',iconActive:'my-icon-waimai2',iconInactive:'my-icon-waimai2-copy',url:'/'},
          {title:'订单',iconActive:'my-icon-wodedingdan',iconInactive:'my-icon-wodedingdan-copy-copy',url:'/Order'},
          {title:'我的',iconActive:'my-icon-wode2',iconInactive:'my-icon-wode2-copy',url:'/Info'},
      ]
    };
  },
  computed:{

  }
}
</script>

<style scoped>

</style>
